Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 3e09d7bc4412d1299e5de56cf31108672824e921


Parents : 802a1a6
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-01T22:45:33-06:00

feat(meshchat): enhance LXMF announce handling by checking for existing announces and recalling identity for hash calculation

Changes

1 files changed, 15 insertions(+), 0 deletions(-)


Diff

diff --git a/meshchatx/meshchat.py b/meshchatx/meshchat.py
index 74c6d744..f0123d55 100644
--- a/meshchatx/meshchat.py
+++ b/meshchatx/meshchat.py
@@ -6980,6 +6980,7 @@ class ReticulumMeshChat:
# Try to find associated LXMF destination hash if this is a telephony announce
lxmf_destination_hash = None
if announce["aspect"] == "lxst.telephony" and announce.get("identity_hash"):
+ # 1. Check if we already have an LXMF announce for this identity
lxmf_announces = self.database.announces.get_filtered_announces(
aspect="lxmf.delivery",
search_term=announce["identity_hash"],
@@ -6993,6 +6994,20 @@ class ReticulumMeshChat:
display_name = self.parse_lxmf_display_name(lxmf_a["app_data"])
break
+ # 2. If not found in announces, try to recall identity and calculate LXMF hash
+ if not lxmf_destination_hash:
+ try:
+ identity_hash_bytes = bytes.fromhex(announce["identity_hash"])
+ identity = RNS.Identity.recall(identity_hash_bytes)
+ if identity:
+ lxmf_destination_hash = RNS.Destination.hash(
+ identity,
+ "lxmf",
+ "delivery",
+ ).hex()
+ except Exception:
+ pass
+
# find lxmf user icon from database
lxmf_user_icon = None
user_icon_target_hash = lxmf_destination_hash or announce["destination_hash"]


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────